#ifndef __TALK_SCENE_H__
#define __TALK_SCENE_H__

#include "cocos2d.h"

#include "SimpleAudioEngine.h"

class Talk : public cocos2d::CCLayer
{
private:
	bool InitCore();

	void ProcessStory();

	int GetCommand(char* text);

	cocos2d::CCLabelTTF* dlg_text;
	char** story;
	int story_max;

	int story_id;
	bool is_touch;
	int touch_x, touch_y;

	bool quit;

public:
	// Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
    virtual bool init();  

    // there's no 'id' in cpp, so we recommand to return the exactly class pointer
    static cocos2d::CCScene* scene();

	virtual void update(float dt);
	virtual void onEnter();
	virtual void onExit();

	bool ccTouchBegan(cocos2d::CCTouch *pTouch, cocos2d::CCEvent *pEvent);

    // implement the "static node()" method manually
	CREATE_FUNC(Talk);
};

#endif  // __TALK_SCENE_H__